package org.apache.lucene.ocean.database;

import java.io.Serializable;

import org.apache.lucene.ocean.TransactionSystem;

/**
 * Task interface that allows generic functionality to be submitted to 
 * an Ocean server node, processed and the result sent back to the client.  
 * 
 * By having a standard interface like Task, implementing classes
 * may be dynamically loaded by the server from the client.  This makes
 * writing and deploying new functionality much simpler than writing code
 * and then restarting each server individually.
 *
 */
public interface Task extends Serializable {
  public Object run(TransactionSystem transactionSystem) throws Exception;
}
